#pragma once
#include<stdlib.h>
#include<stdio.h>
#include<conio.h>
#include<string.h>

typedef void* Pointer;
struct tSList;
typedef struct tSList SList;

SList *slist_append(SList *head,Pointer data);
SList *slist_preppend(SList *list, Pointer data);
void slist_insert(SList *sibling, Pointer data);
SList *slist_find(SList *head, Pointer needle);
SList *slist_remove(SList *list, Pointer data);
SList *slist_remove_all(SList *list, Pointer data);
Pointer slist_remove_next(SList *sibling);
void slist_free(SList *list);
unsigned slist_length(SList *list);
SList *slist_copy(SList *list);
SList *slist_reverse(SList *list);
SList *slist_concat(SList *list1, SList *list2);
int slist_foreach(SList *list,void (*func)(Pointer data, Pointer user_data), Pointer user_data);
